<template>
	<view :style="viewColor">
		<!-- 自定义顶部背景颜色 -->
		<view class="top">
			<!-- #ifdef MP || APP-PLUS -->
			<view class="sys-head">
				<view class="sys-bar" :style="{height:sysHeight}"></view>
				<!-- #ifdef MP-WEIXIN -->
				<view class="sys-title display-flex display-flex-align-center " style="width: 100%;">
					<view class="tool-bar ml-10">
						<view class='iconfont icon-ic_left' @tap='goBack'></view>
					</view>
					<view class="mr-10" style="flex: 1 1 auto;">
						订单详情
					</view>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP-ALIPAY -->
				<view class="sys-title display-flex display-flex-align-center " style="width: 100%;">
					<view class="mr-10" style="flex: 1 1 auto;">
						订单详情
					</view>
				</view>
				<!-- #endif -->
				<view class="bg"></view>
			</view>
			<!-- #endif -->
		</view>
		<view class='order-details' v-if="!loading" >
			<!-- 给header上与data上加on为退款订单-->
			<!--预售-->
			<view :class="{headerCount : orderInfo.status != -1}">	
				
			</view>
			<view :class="{'order-main' : orderInfo.status != -1}">
				<view  class="header-gradient">
					<view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'>
						<view class='pictrue' v-if="isGoodsReturn==false">
							<!-- <image v-if="orderInfo.status != 9" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'"></image>
							<image v-else :src="imgUrl+'/static/order_2.gif'"></image> -->
							<image v-if="orderInfo.status == 12" :src="imgUrl+'/static/order_1.gif'"></image>
							<image v-if="orderInfo.status == 13" :src="imgUrl+'/static/order_1.gif'"></image>
							<image v-if="orderInfo.status == 2" :src="imgUrl+'/static/order_4.gif'"></image>
							<image v-if="orderInfo.status == 3" :src="imgUrl+'/static/order_1.gif'"></image>
							<image v-if="orderInfo.status == 3" :src="imgUrl+'/static/order_1.gif'"></image>
							
						</view>
						<view class='data' :class='isGoodsReturn ? "on":""'>
							<view class='state'>
								<block v-if="orderInfo.status == 13">待确认</block>
								<block v-if="orderInfo.status == 12">{{orderInfo.tour_type==1?"待使用":"待出行"}}</block>
								<block v-if="orderInfo.status == 2">待评价</block>
								<block v-if="orderInfo.status == 3">已完成</block>
								<block v-if="orderInfo.status == -1">已为您退款,感谢您的支持</block>
							</view>
							<view class=" ft-w700 color-white" v-if="orderInfo.status == 13">若订单确认不成功，将全额退款，请您知晓！</view>
							<view>{{orderInfo.date}}</view>
						</view>
					</view>
					<block v-if="isGoodsReturn==false">
						<view class='nav'>
							<view class='navCon acea-row row-between-wrapper'>
								<view class="nav-text">待付款</view>
								<view class="nav-text" :class="orderInfo.status == 13 ? 'on':''" v-if="orderInfo.order_type != 1">待确认</view>
								<view class="nav-text" :class="orderInfo.status == 12 ? 'on':''" v-if="orderInfo.order_type != 1">{{orderInfo.tour_type==1?"待使用":"待出行"}}</view>
								<view class="nav-text" :class="orderInfo.status == 2 ? 'on':''">待评价</view>
								<view class="nav-text" :class="orderInfo.status == 3 ? 'on':''">已完成</view>
							</view>
							<view class='progress acea-row row-between-wrapper'>
								<view class='iconfont icon-ic_jindu2 t-color'></view>
								<view class='line b-color'></view>
								<view class='iconfont' :class='(orderInfo.status == 13 ? "icon-ic_jindu1":"icon-ic_jindu2") + " " +(orderInfo.status == 13 || orderInfo.status == 12 || orderInfo.status==2 || orderInfo.status== 3 ? "t-color":"")'></view>
								<view class='line' :class='orderInfo.status == 12 || orderInfo.status==2 || orderInfo.status== 3? "b-color":""' ></view>
								<view class='iconfont' :class='(orderInfo.status == 12 ? "icon-ic_jindu1":"icon-ic_jindu2") + " " +(orderInfo.status == 12 || orderInfo.status==2 || orderInfo.status== 3 ? "t-color":"")'></view>
								<view class='line' :class='orderInfo.status==2 || orderInfo.status== 3? "b-color":""' ></view>
								<view class='iconfont' :class='(orderInfo.status == 2 ? "icon-ic_jindu1":"icon-ic_jindu2") + " " + (orderInfo.status == 2 || orderInfo.status == 3 ? "t-color":"")'></view>
								<view class='line' :class=' orderInfo.status == 3 ? "b-color":""'></view>
								<view class='iconfont' :class='(orderInfo.status == 3 ? "icon-ic_jindu1":"icon-ic_jindu2") + " " + (orderInfo.status == 3  ? "t-color":"")'></view>
							</view>
						</view>
					</block>
				</view>
				<view class="pad20">
					
					
					
					<view class="mt-10">

						<block v-if="cartInfo.length>0">
							<orderGoods :orderData='orderInfo' :evaluate='orderInfo.status' :activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true"></orderGoods>
	
						</block>
						
					</view>
				<!-- 	<view v-if="orderInfo.linePlanMeal" class="bus-detail-header boder-24 bg-f mt-10" style="padding: 10px;">
						<view class="display-flex ">
							<view class="">
								套餐信息：
							</view>
							<view class="">
								{{orderInfo.linePlanMeal.title}}
							</view>
						</view>
					
					</view> -->
					<view v-if="orderInfo&&orderInfo.lineStops&&orderInfo.lineStops.length>2" class="bus-detail-header boder-24 bg-f mt-10">
						<view class="  ml-5 mr-10 pd-5">
							<view class="tag-title">
							  您选择的上车点
							</view>
							<view class="row">
								
								<view class="display-flex-column" style="margin:10px 8px;color: #000;width: 90%;">
									<view class="row-center" >
										<view class="dot "></view>
										<text class="ft-w700" >{{orderInfo.on_stop_name}}</text>
										<view @click="lookStation(orderInfo.onStopInfo)" class="" style=" color: #235dc5;margin-left: auto;margin-right: 12px;">
											<text class="iconfont icon-zhandian" style="margin-right: 3px;"></text>
											<text>查看位置</text>
										</view>
									</view>
							
								</view>
							</view>
						</view>
					</view>
					<view v-if="orderInfo.linePlan" class="bus-detail-header boder-24 bg-f mt-10" style="padding: 10px;">
						<view @click="openBuyDetail"  class=" header-row rule-line ml-5 mr-10">
							<view class="">
								<view class="header-row" v-if="orderInfo.linePlan.product.refund_switch&&orderInfo.linePlan.product.productRefundRate&&orderInfo.linePlan.product.productRefundRate.length" >
									<view class="iconfont icon-ic-complete mr-10 color-green" ></view>
									<view v-if="orderInfo.linePlan.product.productRefundRate[0].refund_time&&orderInfo.linePlan.product.productRefundRate[0].value<100.00" class="rule-list">
										发车前{{convertMinutesToTimeAgo(orderInfo.linePlan.product.productRefundRate[0].refund_time)}}可在线退票 
									</view>
									<view v-else class="rule-list">
										不可在线退票，请联系客服咨询
									</view>
								</view>
								<view class="header-row" v-else >
									<view class="iconfont icon-ic_close mr-10 color-red" ></view>
									<view class="rule-list">
										不可在线退票，请联系客服咨询
									</view>
								</view>
								<view class="header-row mt-5" v-if="orderInfo.linePlan.is_return_trip" >
									<view class="iconfont icon-ic-complete mr-10 color-green" ></view>
									<view class="rule-list" style="color: #0086F6;">
										含往返车票
									</view>
								</view>
								<view class="header-row mt-5" v-if="orderInfo.linePlan.plan_type==3&&orderInfo.linePlan.is_must==0" >
									<view class="iconfont icon-ic-complete mr-10 color-green" ></view>
									<view class="rule-list ">
										需预约满{{orderInfo.linePlan.lowest_num}}人发车，如预约失败，系统自动全额退款
									</view>
								</view>
								<view class="header-row mt-5" v-if="orderInfo.linePlan.plan_type==3&&orderInfo.linePlan.is_must==1" >
									<view class="iconfont icon-ic-complete mr-10 color-green" ></view>
									<view class="rule-list ">
										已众筹拼车成功，不允许在线退票
									</view>
								</view>
								
							</view>
							<view class="product-desc">
								购票须知<text class="iconfont icon-ic_right text-10 ml-2"></text>
							</view>
						</view>
						
						<!-- 去程信息 -->
						<view class="tag-title">
						  车次信息
						</view>
						<view class="bus-detail-header in-desc-header-container display-flex-align-center">		
							<view class="header-row info-line" style="margin-top: -4px;"> 
								<view class="info-tag">	{{orderInfo.linePlan.is_return_trip?'去程':'出发'}}	</view>
								<view class="">{{orderInfo.linePlan.date_desc}}</view>
								<view class="flex1"></view>
								<view class="iconfont icon-ic_clock2 mr-5"></view>
								<view class="">	约{{convertMinutesToHours(orderInfo.linePlan.product.duration)}}小时</view>
							</view>
							<view class="header-row  display-flex-align-center header-section mb-10">
								<view class="flex1">
									<view class="header-row station-row">
										<view class="dot "></view>
										<view class="time">	{{orderInfo.linePlan.dp_time}}</view>
										<view class="flex1">
											<view class="">
												{{orderInfo.linePlan.startStop.name}}
											</view>
											<view v-if="orderInfo.linePlan.startStop.remark" class="station-text">
												{{orderInfo.linePlan.startStop.remark}}
											</view>
										</view>
										
									</view>
									<view class="header-row station-row">
										<view class="dot arr"></view>
										<view class="time">	{{addMinutesToTime(orderInfo.linePlan.dp_time,orderInfo.linePlan.product.duration)}}</view>
										<view class="flex1">
											<view class="">
												{{orderInfo.linePlan.endStop.name}}
											</view>
											<view v-if="orderInfo.linePlan.endStop.remark" class="station-text">
												{{orderInfo.linePlan.endStop.remark}}
											</view>
										</view>
									</view>
								    
								</view>
								<view @click="openLoc" class="show-station-btn btn">
								 	<image :src="`${domain}/static/images/loc.png`" style="height: 22px;width: 24px;"></image>
									<view>地址</view>
								</view>
							</view>
						    
						</view>
						<!-- 去程信息 -->
						<!-- 返程信息 -->
						<view v-if="orderInfo.linePlan.is_return_trip" class="bus-detail-header in-desc-header-container">
							<view class="header-row info-line" style="margin-top: -4px;"> 
								<view class="info-tag">	返程	</view>
								<view class="">{{orderInfo.linePlan.return_trip_date_desc}}</view>
								
							</view>
							<view class="header-row  display-flex-align-center header-section mb-10">
								<view class="flex1">
									<view class="header-row station-row">
										<view class="dot "></view>
										<view class="flex1">
											<view class="">
												{{orderInfo.linePlan.endStop.name}}
											</view>
											<view v-if="orderInfo.linePlan.endStop.remark" class="station-text">
												{{orderInfo.linePlan.endStop.remark}}
											</view>
										</view>
										
									</view>
									<view class="header-row station-row">
										<view class="dot arr"></view>
										<view class="flex1">
											<view class="">
												{{orderInfo.linePlan.startStop.name}}
											</view>
											<view v-if="orderInfo.linePlan.startStop.remark" class="station-text">
												{{orderInfo.linePlan.startStop.remark}}
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
						<!-- 返程信息 -->
						
					</view>
					
					<view v-if="orderInfo.priceDate&&orderInfo.priceDate.product&&orderInfo.priceDate.productMeal.startStop" class="bus-detail-header boder-24 bg-f mt-10" style="padding: 10px;">
						<view @click="openBuyDetail"  class=" header-row rule-line ml-5 mr-10">
							<view class="">
								<view class="header-row" v-if="orderInfo.priceDate.product.refund_switch&&orderInfo.priceDate.product.productRefundRate&&orderInfo.priceDate.product.productRefundRate.length" >
									<view class="iconfont icon-ic-complete mr-10 color-green" ></view>
									<view v-if="orderInfo.priceDate.product.productRefundRate[0].refund_time&&orderInfo.priceDate.product.productRefundRate[0].value<100.00" class="rule-list">
										发车前{{convertMinutesToTimeAgo(orderInfo.priceDate.product.productRefundRate[0].refund_time)}}可在线退票 
									</view>
									<view v-else class="rule-list">
										不可在线退票，请联系客服咨询
									</view>
								</view>
								<view class="header-row" v-else >
									<view class="iconfont icon-ic_close mr-10 color-red" ></view>
									<view class="rule-list">
										不可在线退票，请联系客服咨询
									</view>
								</view>
								
							</view>
							<view class="product-desc">
								购票须知<text class="iconfont icon-ic_right text-10 ml-2"></text>
							</view>
						</view>
						<view class="tag-title" v-if="orderInfo.priceDate.product.startStop">
						  集合地点
						</view>
						<view @click="lookStation(orderInfo.priceDate.productMeal.startStop)" v-if="orderInfo.priceDate.productMeal.startStop" class="bus-detail-header in-desc-header-container display-flex-align-center">
											
							<view class="header-row  display-flex-align-center header-section mb-10">
								<view class="flex1">
									<view class="">
										{{orderInfo.priceDate.productMeal.startStop.name}}
									</view>
									<view v-if="orderInfo.priceDate.productMeal.startStop.remark" class="station-text">
										{{orderInfo.priceDate.productMeal.startStop.remark}}
									</view>
								</view>
								<view  class="show-station-btn btn">
								 	<image :src="`${domain}/static/images/loc.png`" style="height: 22px;width: 24px;"></image>
									<view>点击查看位置</view>
								</view>
							</view>
						    
						</view>
						<!-- <view @click="lookStation(orderInfo.priceDate.product.startStop)" v-if="orderInfo.priceDate.product.startStop" class="bus-detail-header in-desc-header-container display-flex-align-center">		
					
							<view class="header-row  display-flex-align-center header-section mb-10">
								<view class="flex1">
									<view class="">
										{{orderInfo.priceDate.product.startStop.name}}
									</view>
									<view v-if="orderInfo.priceDate.product.startStop.remark" class="station-text">
										{{orderInfo.priceDate.product.startStop.remark}}
									</view>
								</view>
								<view  class="show-station-btn btn">
								 	<image :src="`${domain}/static/images/loc.png`" style="height: 22px;width: 24px;"></image>
									<view>点击查看位置</view>
								</view>
							</view>
						    
						</view> -->
					
					</view>
					
					
					<!-- 直通车 -->
					<view class='wrapper boder-24' v-if="orderInfo.linePlan&&(orderInfo.status == 12)">
						<!-- 验票信息 -->
						<view  class="tickets-way-box">
							<view class="tickets-qrcode">
								<view class="title-box display-flex">
									<view class="title">
										请展示二维码 或 提供数字核销码
									</view>
								</view>
								<view class="qrcdoe-box">
									<view class="qrcode-item" @click="showCode">
										<view class="pictrue">
											<image :src="codeUrl"></image>
										</view>
										<text class="maxglass"></text>
									</view>
									<view class="ticket-info">
										{{orderInfo.verify_code}}
									</view>
								</view>
						
							</view>
						</view>
					
						<!-- 验票信息 -->
					</view>
					
				    <!-- 其他旅游产品 -->
					<view class='wrapper boder-24' v-if="orderInfo.priceDate.product.tour_type == 1 &&orderInfo.priceDate&&(orderInfo.status == 12)">
						<!-- 验票信息 -->
						<!-- 门票 身份证直接入园-->
						<view v-if="orderInfo.priceDate.product.check_type==2" class="display-flex display-flex-align-center">
							<text class=" mr-10 text-black">验票方式：</text>
							<text class="iconfont icon-a-ic_discount mr-10"></text>
							<text>无需取票凭【身份证】直接验证入园</text>
						</view>
						<view v-else-if="orderInfo.priceDate.product.check_type==1" class="tickets-way-box">
							<view class="tickets-qrcode">
								<view class="title-box display-flex">
									<view class="title">
										请展示二维码 或 提供数字核销码
									</view>
								</view>
								<view class="qrcdoe-box">
									<view class="qrcode-item" @click="showCode">
										<view class="pictrue">
											<image :src="codeUrl"></image>
										</view>
										<text class="maxglass"></text>
									</view>
									<view class="ticket-info">
										{{orderInfo.verify_code}}
									</view>
								</view>
						
							</view>
						</view>
						<view v-if="orderInfo.priceDate.product.check_type==3" class="display-flex display-flex-align-center">
							<text class=" mr-10 text-black ft-w700">验票方式：</text>
							<text class="iconfont icon-a-ic_discount mr-10"></text>
							<text>需指定地点取票</text>
						</view>
						<view v-if="orderInfo.use_address || orderInfo.priceDate.product.use_address" class="display-flex display-flex-align-center mt-10">
							<text class=" mr-10 text-black ft-w700">入园/使用地址：</text>
							<text>{{orderInfo.use_address?orderInfo.use_address:( orderInfo.priceDate.product.use_address? orderInfo.priceDate.product.use_address:"")}}</text>
						</view>
						<!-- 验票信息 -->
					</view>
					<view class='wrapper boder-24' v-if="orderInfo.storeOrderPassenger && orderInfo.storeOrderPassenger.length">
						<view class="tag-title">游客/乘客</view>
						<view class="">
							<view class="row-center " style="margin: 5px 12px;" v-for="(item, index) in orderInfo.storeOrderPassenger" :key=index>
								<text class="text-14 color-66 ft-w600" style="width: 70px;">{{item.passenger.name}}</text>
								<text class="color-999 text-12 mt-5 " style="width: 180px;" >{{item.passenger.id_card}}</text>
								<view class="idcard-tip">
									{{item.passenger.type==1?'成人票':'儿童票'}}
								</view>
								
							</view>
						</view>

					</view>
					
					<view class='wrapper boder-24'>
						<view class='item acea-row row-between'>
							<view>订单编号：</view>
							<view class='conter acea-row row-middle row-right'>{{orderInfo.order_sn}}
								<!-- #ifndef H5 -->
								<text class='copy' @tap='copy'>复制</text>
								<!-- #endif -->
								<!-- #ifdef H5 -->
								<text class='copy copy-data' :data-clipboard-text="orderInfo.order_sn">复制</text>
								<!-- #endif -->
							</view>
						</view>
						<view class='item acea-row row-between'>
							<view>下单时间：</view>
							<view class='conter'>{{orderInfo.create_time}}</view>
						</view>
						<view class='item acea-row row-between'>
							<view>支付状态：</view>
							<view class='conter'>已支付</view>
						</view>
						<view class='item acea-row row-between' v-if="orderInfo.pay_time">
							<view>支付时间：</view>
							<view class='conter'>{{orderInfo.pay_time}}</view>
						</view>
						<view class='item acea-row row-between'>
							<view>产品总额：</view>
							<view class='conter'>¥{{orderInfo.total_price}}</view>
						</view>
						<view class='item acea-row row-between'>
							<view>支付方式：</view>
							<view class='conter' v-if="orderInfo.pay_type==0">余额支付</view>
							<view class='conter' v-if="orderInfo.pay_type==7">线下支付</view>
							<view class='conter' v-if="orderInfo.pay_type==4 || orderInfo.pay_type==5 || orderInfo.pay_type==8">支付宝支付</view>
							<view class='conter' v-if="orderInfo.pay_type==1 || orderInfo.pay_type==2 || orderInfo.pay_type==3">微信支付</view>
						</view>
						<view class='item acea-row row-between' v-if="orderInfo.mark">
							<view>买家留言：</view>
							<view class='conter'>{{orderInfo.mark}}</view>
						</view>
					</view>
					<view class='wrapper boder-24'>
						<view class='item acea-row row-between' v-if='orderInfo.coupon_price > 0'>
							<view>优惠券抵扣：</view>
							<view class='conter'>-¥{{orderInfo.coupon_price}}</view>
						</view>
						<view class='item acea-row row-between' v-if='orderInfo.integral'>
							<view>积分抵扣：</view>
							<view class='conter'>-¥{{orderInfo.integral_price}}</view>
						</view>
						<view class='item acea-row row-between' v-if="orderInfo.activity_type == 2">
							<view>实付款：</view>
							<view class='conter'>¥{{orderInfo.presell_price}}</view>
						</view>
						<view class='item acea-row row-between' v-else>
							<view>实付款：</view>
							<view class='conter'>¥{{orderInfo.pay_price}}</view>
						</view>
					</view>
				</view>
				
			</view>
			<view class="content-clip" v-if="isGoodsReturn==false && (orderInfo.status != 0 || (orderInfo.status == 0 && refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch))"></view>
			<!-- <view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">		

				<view v-if="!orderInfo.receipt && !isGoodsReturn && orderInfo.open_receipt == 1" class='bnt cancel' @click="applyInvoice">申请开票</view>
				<block v-if="orderInfo.status == 12">
					<view class='bnt b-color' @click="goOrderConfirm">再次购买</view>
				</block>
				<block v-if="orderInfo.status == 2">
					<view class='bnt b-color' @click="goOrderConfirm">再次购买</view>
				</block>
				<block v-if="orderInfo.status == 3">
					<view class='bnt cancel' @click="delOrder">删除订单</view>
					<view class='bnt b-color' @click="goOrderConfirm">再次购买</view>
				</block>
			</view> -->
		</view>
		<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment>
		<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
		<!--核销码弹窗-->
		<!-- <uni-popup   ref="cancellPoupon" type="center">
			
			<view class="" style="display: flex; justify-content: center;">
				<view class="" style="height: 200px;width: 200px;">
					<image style="width: 100%;height: 100%;" :src="codeUrl"></image>
				</view>
			</view>
		</uni-popup> -->
		<uni-popup ref="cancellPoupon" type="bottom" background-color="#fff">
			<view class="code-content">
				<text class="iconfont popup-close icon-ic_close" @click="close"></text>
				<view class="title font-500">核销码</view>
				<view class="trip">
					请展示二维码 或 提供数字核销码
				</view>
				<view class="grayBg">
					<view class="pictrue">
						<image :src="codeUrl"></image>
					</view>
				</view>
				<view class="num">{{orderInfo.verify_code}}</view>
			</view>
		</uni-popup>
		<uni-popup ref="locRef" type="bottom" background-color="#fff">
			 <view class="bg-white br-8" style="height: 300px;">
			 	<view class="popup-header"> 
			 		<view class="popup-title">
			 			站点地址
			 		</view>
			 		<view @click="locColse" class="popup-close1 iconfont icon-ic_close text-18">	</view>
			 	</view>
				<view class="locpop mt-10" v-if="orderInfo.linePlan">
					<scroll-view scroll-y="true" style="height:270px;padding-bottom: 30px;">
						<view  @click="lookStation(orderInfo.linePlan.startStop)" class="display-flex-column" style="align-items: flex-start;">
							<view class="display-flex-column" style="margin-left: 10%;width: 80%;">
								<view class="row-center" style="justify-content: center;">
									<text style="width: 40px;">{{orderInfo.linePlan.dp_time}}</text>
									<view class="dot" style="background-color: #00b87a;"></view>
									<text  class="text-black ft-w700">{{orderInfo.linePlan.start_stop_name}}</text>
									<image class="ml-auto" :src="`${domain}/static/images/loc.png`" style="height: 18px;width: 20px;"></image>
								</view>
								<view  class="shu-line3" style="margin-left: 52px;"></view>
							</view>	    						
						</view>
						<view  @click="lookStation(orderInfo.linePlan.endStop)" class="display-flex-column" style="align-items: flex-start;">
							<view class="display-flex-column" style="margin-left: 10%;width: 80%;">
								<view class="row-center" style="justify-content: center;">
									<text style="width: 40px;">{{addMinutesToTime(orderInfo.linePlan.dp_time,orderInfo.linePlan.product.duration)}}</text>
									<view class="dot" style="background-color: #f5190a;"></view>
									<text class="text-black ft-w700">{{orderInfo.linePlan.end_stop_name}}</text>
									<image class="ml-auto" :src="`${domain}/static/images/loc.png`" style="height: 20px;width: 20px;"></image>
								</view>
							</view>	    						
						</view>
					</scroll-view>
				</view>
			 </view>
		</uni-popup>
		<uni-popup ref="buyDetailRef" type="bottom" background-color="#fff">
			<view class="bg-white br-8" :style="'height:'+windowHeight*0.82+'px' ">
				<view class="popup-header"> 
					<view class="popup-title">
						退改须知
					</view>
					<view @click="closeBuyDetail" class="popup-close1 iconfont icon-ic_close text-18"></view>
				</view>

				<view class=" mt-10 ml-10 mr-10" v-if="orderInfo.priceDate">
					<scroll-view :scroll-y="true"  :style="'height:'+windowHeight*0.8+'px' ">
						<view class="">
							<view class="tag-title">
							  退改规则
							</view>
							<view class="tag-content">
								1.本产品暂不支持线上改签功能
							</view>
							<view class="tag-content">
								2.因我司原因造成无法出行，我司将进行全额退款。
							</view>
							<view class="tag-content">
								3.因乘客个人原因造成无法出行的，按以下规则处理：
							</view>
							<view class="mt-10 mb-10">
								<view class="cost-table">
									<!-- 1儿童限制2年龄限制3人群限制 -->
									<view class="cost-table-td">
										<view class="cost-table-td-left color-66 ft-w500" style="width: 200px;background: #efeff4;">
											取消时间
										</view>
										<view class="cost-table-td-right color-66 ft-w500" style="background: #efeff4;">
											损失费用
										</view>
									</view>
									<view class="cost-table-td" v-for="(refundRate,indexl) in orderInfo.priceDate.product.productRefundRate" :key="indexl">
										<view class="cost-table-td-left ft-w500" style="width: 200px">
											{{filterRefund(refundRate)}}
										</view>
										<view class="cost-table-td-right color-66">
											{{refundRate.value}}%
										</view>
									</view>
								</view>
							</view>
							<view class="tag-content">
								4.若产生退款，将在1-7个工作日内原渠道退回。
							</view>
							<view class="tag-content">
								5.若班次类型为预约班，如预约失败，系统自动全额退款。
							</view>
						</view>
						<view  class=""  v-if="orderInfo.priceDate.product.productRefundRule.content">
							<view class="tag-title">
							  退改特别说明：
							</view>
							<view  v-if="orderInfo.priceDate.product.productRefundRule.content" class="tag-content" v-html="orderInfo.priceDate.product.productRefundRule.content"></view>
						</view>
						<view style="height: 120px;"></view>
						
					</scroll-view>
					
				</view>
				<view class=" mt-10 ml-10 mr-10" v-else-if="orderInfo.linePlan">
					<scroll-view :scroll-y="true"  :style="'height:'+windowHeight*0.8+'px' ">
						<view class="">
							<view class="tag-title">
							  退改规则
							</view>
							<view class="tag-content">
								1.本产品暂不支持线上改签功能
							</view>
							<view class="tag-content">
								2.因我司原因造成无法出行，我司将进行全额退款。
							</view>
							<view class="tag-content">
								3.因乘客个人原因造成无法出行的，按以下规则处理：
							</view>
							<view class="mt-10 mb-10">
								<view class="cost-table">
									<!-- 1儿童限制2年龄限制3人群限制 -->
									<view class="cost-table-td">
										<view class="cost-table-td-left color-66 ft-w500" style="width: 200px;background: #efeff4;">
											取消时间
										</view>
										<view class="cost-table-td-right color-66 ft-w500" style="background: #efeff4;">
											损失费用
										</view>
									</view>
									<view class="cost-table-td" v-for="(refundRate,indexl) in orderInfo.linePlan.product.productRefundRate" :key="indexl">
										<view class="cost-table-td-left ft-w500" style="width: 200px">
											{{filterRefund(refundRate)}}
										</view>
										<view class="cost-table-td-right color-66">
											{{refundRate.value}}%
										</view>
									</view>
								</view>
							</view>
							<view class="tag-content">
								4.若产生退款，将在1-7个工作日内原渠道退回。
							</view>
							<view class="tag-content">
								5.若班次类型为预约班，如预约失败，系统自动全额退款。
							</view>
						</view>
						<view  class=""  v-if="orderInfo.linePlan.product.productRefundRule.content">
							<view class="tag-title">
							  退改特别说明：
							</view>
							<view  v-if="orderInfo.linePlan.product.productRefundRule.content" class="tag-content" v-html="orderInfo.linePlan.product.productRefundRule.content"></view>
						</view>
						<view style="height: 120px;"></view>
						
					</scroll-view>
					
				</view>
			</view>
		</uni-popup>
		
	</view>
</template>
<script>

	let app = getApp();
	let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
	let windowHeight = uni.getSystemInfoSync().windowHeight ;
	import { HTTP_REQUEST_URL } from '@/config/app';
	import {
		getOrderDetail,
		orderAgain,
		orderTake,
		orderDel,
		unOrderCancel,
		verifyCode,
		applyInvoiceApi
	} from '@/api/order.js';
	import { postCombinationRemove } from '@/api/activity';
	import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js';
	import { getUserInfo } from '@/api/user.js';
	import payment from '@/components/payment';
	import orderGoods from "./components/orderGoods";
	import ClipboardJS from "@/plugin/clipboard/clipboard.js";
	import { mapGetters } from "vuex";
	import { configMap } from "@/utils";
	import { toLogin } from '@/libs/login.js';
	import addInvoicing from '@/components/addInvoicing';
	import zbCode from '@/components/zb-code/zb-code.vue';
	export default {
		components: {
			payment,
			orderGoods,
			addInvoicing,
			zbCode
		},
		data() {
			return {
				domain: HTTP_REQUEST_URL,	
				sysHeight: sysHeight,
				windowHeight: windowHeight,
				order_id: '',
				evaluate: 0,
				activityType: 0,
				cartInfo: [], //购物车产品
				orderInfo: {
					system_store: {},
					_status: {},
					take: {}
				}, //订单详情
				system_store: {},
				isGoodsReturn: false, //是否为退款订单
				status: {}, //订单底部按钮状态
				isClose: false,
				//支付方式
				payMode: [
					// #ifdef MP-WEIXIN
					{
					name: '微信支付',
					icon: 'icon-a-ic_wechatpay',
					value: 'routine',
					title: '微信快捷支付',
					payStatus: true
					},
					// #endif
					// #ifdef MP-ALIPAY
					{
					name: '支付宝支付',
					icon: 'icon-a-ic_alipay',
					value: 'alipayRoutine',
					title: '支付宝支付',
					payStatus: true
					}
					// #endif
					// #ifdef MP-BAIDU
					{
					name: '百度支付',
					icon: 'icon-baidu-zhifu',
					value: 'baiduRoutine',
					title: '百度支付',
					payStatus: true
					}
					// #endif
					
				],
				pay_close: false,
				pay_order_id: '',
				totalPrice: 0,
				refundNum: [], //退款个数临时数据
				imgUrl:HTTP_REQUEST_URL,
				codeUrl:'',
				isTimePay: false,
				codeShow: false,
				cid: '1',
				val: "", // 要生成的二维码值
				size: 200, // 二维码大小
				unit: 'upx', // 单位
				background: '#FFF', // 背景色
				foreground: '#000', // 前景色
				pdground: '#32dbc6', // 角标色
				icon: '', // 二维码图标
				iconsize: 40, // 二维码图标大小
				lv: 3, // 二维码容错级别 ， 一般不用设置，默认就行
				onval: true, // val值变化时自动重新生成二维码
				loadMake: true, // 组件加载完成后自动生成二维码
				src: '', // 二维码生成后的图片地址或base64
				codeSrc: "",
				wd: 225,
				hg: 500,
				invoice: {
					invoice: false,
					add: false,
				},
				loading: true
			};
		},
		computed:{
			...configMap({hide_mer_status:0,yue_pay_status:0,alipay_open:0},
			mapGetters(['isLogin','uid','viewColor','keyColor'])),
		},
		filters:{
			filterDay(val){
				if(val){
					var reg =/(\d{4})\-(\d{2})\-(\d{2})/;
					var date = val.replace(reg,"$2月$3日");
					return date
				}
			}
		},
		onLoad: function(options) {
			if (options.order_id) {
				this.$set(this, 'order_id', options.order_id);
			}
		},
		onShow() {
			if (this.isLogin) {
				this.getOrderInfo();
				this.getUserInfo();
				this.isPayBalance();
			} else {
				toLogin()
			}
		},
		onHide: function() {
			this.isClose = true;
		},
		onReady: function() {
			// #ifdef H5
			this.$nextTick(function() {
				const clipboard = new ClipboardJS(".copy-data");
				clipboard.on("success", () => {
					this.$util.Tips({
						title: '复制成功'
					});
				});
			});
			// #endif
		},
		mounted: function() {},
		methods: {
			// 图片预览
			getPhotoClickIdx(list, idx) {
				uni.previewImage({
					current: list[idx], //  传 Number H5端出现不兼容
					urls: list
				});
			},
			// 判断是否到支付尾款时间
			isPayBalance(){
				let that = this;
				if(that.orderInfo.status === 10){
					if(new Date() < new Date(that.orderInfo.presellOrder.final_start_time)){
						that.isTimePay = false; //未开始
					}else if((new Date() >= new Date(that.orderInfo.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderInfo.presellOrder.final_start_time)) ){
						that.isTimePay = true; //立即支付
					}
				}
			},
			// 数字转汉字
			toChinese(num){
				let changeNum = ['零', '一', '二', '三', '四', '五', '六', '日', '八', '九'];
				let unit = ["", "十", "百", "千", "万"];
				num = parseInt(num);
				let getWan = (temp) => {
				　　let strArr = temp.toString().split("").reverse();
				　　let newNum = "";
				　　for (var i = 0; i < strArr.length; i++) {
					　　newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
				　　}
				 　 return newNum;
			 }
			 let overWan = Math.floor(num / 10000);
			 let noWan = num % 10000;
			 if (noWan.toString().length < 4) {　　　　　　noWan = "0" + noWan;　　　 }
			 return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
			},
			// 返回店铺首页
			goStore(mer_id){
				if(this.hide_mer_status != 1){
					uni.navigateTo({
						url: '/pages/store/home/index?id=' + mer_id
					})
				}
			},
			// 批量退款
			allRefund() {
				// #ifdef MP
				openOrderRefundSubscribe().then(() => {
					uni.hideLoading();
					if (this.orderInfo.status == 0 || this.orderInfo.is_virtual != 0) {
						uni.navigateTo({
							url: '/pages/users/refund/index?order_id=' + this.order_id + '&refund_type=1&type=2&order_type='+this.orderInfo.order_type
						})
					} else {
						uni.navigateTo({
							url: '/pages/users/refund/select?order_id=' + this.order_id + '&type=2&order_type='+this.orderInfo.order_type
						})
					}
				}).catch(() => {
					uni.hideLoading();
				})
				// #endif
				// #ifdef H5 || APP-PLUS
				if (this.orderInfo.status == 0 || this.orderInfo.is_virtual != 0) {
					uni.navigateTo({
						url: '/pages/users/refund/index?order_id=' + this.order_id + '&refund_type=1&type=2&order_type='+this.orderInfo.order_type
					})
				} else {
					uni.navigateTo({
						url: '/pages/users/refund/select?order_id=' + this.order_id + '&type=2&order_type='+this.orderInfo.order_type
					})
				}
				// #endif
			},
			//拼团取消
			getCombinationRemove: function() {
				var that = this;
				postCombinationRemove({
					group_buying_id: that.orderInfo.orderProduct[0].activity_id
					})
					.then(res => {
						that.$util.Tips({
							title: res.message
						}, {
							tab: 3
						});
					})
					.catch(res => {
						that.$util.Tips({
							title: res.message
						});
					});
			},
			// 取消售后
			cancelSales(){
				let that = this;
				uni.showModal({
				  content: '确定要取消售后？',
				  success: function(res) {
				    if(res.confirm) {
				      deletePlantApi(that.id).then(res => {
				      	if (res.status === 200) {
				      		that.$util.Tips({
				      			title: res.message
				      		});								
								}
				      })
				    } else if(res.cancel) {
				      console.log('用户点击取消');
				    }
				  }
				});
			},	
			openSubcribe: function(e) {
				let page = e;
				uni.showLoading({
					title: '正在加载',
				})
				openOrderRefundSubscribe().then(res => {
					uni.hideLoading();
					uni.navigateTo({
						url: page,
					});
				}).catch(() => {
					uni.hideLoading();
				});
			},
			goBack: function() {
				uni.navigateBack();
			},
			/**
			 * 事件回调
			 *
			 */
			onChangeFun: function(e) {
				let opt = e;
				let action = opt.action || null;
				let value = opt.value != undefined ? opt.value : null;
				(action && this[action]) && this[action](value);
			},
			/**
			 * 拨打电话
			 */
			makePhone: function() {
				uni.makePhoneCall({
					phoneNumber: this.orderInfo.take.mer_take_phone
				})
			},
			
			/**
			 * 打开地图
			 *
			 */
			showMaoLocation: function() {
				if (!this.orderInfo.take.mer_take_location[0] || !this.orderInfo.take.mer_take_location[1]) return this.$util.Tips({
					title: '请设置允许商城访问您的位置！'
				});
				let that = this, lat = parseFloat(that.orderInfo.take.mer_take_location[0]),
				    long = parseFloat(that.orderInfo.take.mer_take_location[1])
				//#ifdef H5
				if (that.$wechat.isWeixin() === true) {
					that.$wechat.seeLocation({
						latitude: Number(lat),
						longitude: Number(long),
						address: that.orderInfo.take ? that.orderInfo.take.mer_take_name : ''
					}).then(res=>{
						console.log('success');
					})
				}else{
				  //#endif
					uni.openLocation({
						latitude: lat,
						longitude: long,
						address: that.orderInfo.take ? that.orderInfo.take.mer_take_name : '',
						scale: 8,
						success: function() {},
					});
					// #ifdef H5
				}
				//#endif
			},
			/**
			 * 关闭支付组件
			 *
			 */
			payClose: function() {
				this.pay_close = false;
			},
			/**
			 * 打开支付组件
			 *
			 */
			pay_open: function() {
				this.pay_close = true;
				this.pay_order_id = this.orderInfo.order_id.toString();
				this.totalPrice = this.orderInfo.pay_price;
			},
			/**
			 * 支付成功回调
			 *
			 */
			pay_complete: function() {
				this.pay_close = false;
				this.pay_order_id = '';
				this.getOrderInfo();
			},
			/**
			 * 支付失败回调
			 *
			 */
			pay_fail: function() {
				this.pay_close = false;
				this.pay_order_id = '';
			},
			openLoc(){
				this.$refs.locRef.open()
			},
			openBuyDetail(){
				this.$refs.buyDetailRef.open()
			},
			closeBuyDetail(){
				this.$refs.buyDetailRef.close()
			},
			locColse(){
				this.$refs.locRef.close()
			},
			lookStation:function(item){
				let that = this
			
				uni.showActionSheet({
					itemList: ['查看实景图','导航去这里'],
					success: function (res) {
						that.daClick(res.tapIndex,item)
					},
					fail: function (res) {
						console.log(res.errMsg);
					}
				});	
			},
			//导航
			daClick:function(e,item) {
				var that = this
				if(e==1){
					const arr = item.lng_lat.split(";");
					uni.openLocation({
						//​使用微信内置地图查看位置。
						latitude: parseFloat(arr[1]),
						longitude: parseFloat(arr[0]),
						name: item.name
					});
				} else {
					
				   item.pics&&item.pics.length?that.joinQun(item):that.$util.Tips({title: '该站点暂无站点图片'});
				}
			},
			joinQun:function(item){
				   // 预览图片
				
				   var that = this
				   
				   var 	urls = item.pics;
				   console.log('urls',urls)
				   uni.previewImage({
					current: 0,   
				   	urls: urls,
					fail(err) {
						console.log('err', err)
					}
				   });
			},
			
			/**
			 * 获取用户信息
			 *
			 */
			getUserInfo: function() {
				let that = this;
				getUserInfo().then(res => {
					// // #ifndef MP
					// that.payMode[2].number = res.data.now_money;
					// // #endif
					// // #ifdef MP
					// that.payMode[1].number = res.data.now_money;
					// // #endif
				})
			},
			getOrderCode(){
				verifyCode(this.order_id).then(res=>{
					this.codeUrl = res.data.qrcode
					this.val = res.data.qrcode
				})
			},
			/**
			 * 获取订单详细信息
			 *
			 */
			getOrderInfo: function() {
				let that = this;
				uni.showLoading({
					title: "正在加载中"
				});
				this.loading = true;
				getOrderDetail(that.order_id).then(res => {	
					this.loading = false;
					uni.hideLoading();
					that.$set(that, 'orderInfo', res.data);
					that.orderInfo.take = res.data.take;
					that.$set(that, 'cartInfo', res.data.orderProduct);
					if (that.orderInfo.status == '-1') {
						that.isGoodsReturn = true;
					}
					res.data.orderProduct.map(el => {
						if (el.refund_num == 0) {
							that.refundNum.push(el)
						}
					})
					that.getOrderCode()
				}).catch(err => {
					this.loading = false;
					uni.hideLoading();
					that.$util.Tips({
						title: err
					}, '/pages/users/order_list/index');
				});
			},
			qrR(res) {
				this.codeSrc = res
			},
			showCode() {
				this.$refs.cancellPoupon.open();
			},
			close(){
				this.$refs.cancellPoupon.close();
			},
			/**
			 *
			 * 剪切订单号
			 */
			// #ifndef H5
			copy: function() {
				let that = this;
				uni.setClipboardData({
					data: that.orderInfo.order_sn,
					success: function(res){
					}

				});
			},
			// #endif
			/**
			 *
			 * 剪切卡密内容
			 */
			// #ifndef H5
			copyKm: function() {
				let that = this;
				uni.setClipboardData({
					data: that.orderInfo.delivery_id,
					success: function(res){
					}
			
				});
			},
			// #endif
			/**
			 * 去拼团详情
			 *
			 */
			goJoinPink: function() {
				uni.navigateTo({
					url: '/pages/activity/combination_status/index?id=' + this.orderInfo.orderProduct[0].activity_id,
				});
			},
			filterRefund(refundRate){
				// switch (refundRate.type) {
				// 	case 1:
				// 		return "使用前"+ (refundRate.refund_time?  refundRate.refund_time +'分钟（含）之前':'')
				// 	case 2:
				// 		return "使用前"+ (refundRate.refund_time?  refundRate.refund_time +'分钟之后':'');
			
				// }
				switch (refundRate.type) {
					case 1:
						return  "使用前"+ this.convertMinutesToTimeAgo(refundRate.refund_time)+'（含）之前'
					case 2:
						return  "使用前"+  this.convertMinutesToTimeAgo(refundRate.refund_time)+'之后';
				
				}
			},
			
			convertMinutesToHours(minutes) {
			  return (minutes / 60).toFixed(1);
			},
			addMinutesToTime(timeStr, minutesToAdd) {
			  const [hours, minutes] = timeStr.split(':').map(Number);
			  let totalMinutes = hours * 60 + minutes + minutesToAdd;
			  while (totalMinutes >= 24 * 60) {
			    totalMinutes -= 24 * 60;
			  }
			  const newHours = Math.floor(totalMinutes / 60);
			  const newMinutes = totalMinutes % 60;
			  return `${newHours.toString().padStart(2, '0')}:${newMinutes.toString().padStart(2, '0')}`;
			},
			convertMinutesToTimeAgo(minutes) {
			  const days = Math.floor(minutes / (24 * 60));
			  const remainingMinutes = minutes % (24 * 60);
			  const hours = Math.floor(remainingMinutes / 60);
			  const minutesPart = remainingMinutes % 60;
			
			  let result = '';
			  if (days > 0) {
			    result += `${days}天前`;
			    if (hours > 0 || minutesPart > 0) {
			      result += `${hours.toString().padStart(2, '0')}:${minutesPart.toString().padStart(2, '0')}`;
			      if (hours === 0 && minutesPart === 0) {
			        result = result.slice(0, -1);
			      }
			    } else {
			      result = result.slice(0, -1);
			    }
			  } else if (hours > 0) {
			    result += `${hours}小时${minutesPart > 0? `${minutesPart}分钟` : ''}`;
			  } else {
			    result += `${minutesPart}分钟`;
			  }
			
			  return result;
			},
			/**
			 * 再此购买
			 *
			 */
			goOrderConfirm: function() {
				let that = this;
				let data = []
				this.cartInfo.map((item, index) => {
					let obj = {}
					obj.product_id = item.product_id
					obj.product_attr_unique = item.product_sku
					obj.cart_num = item.product_num
					data.push(obj)
				})
				orderAgain({
					data: data
				}).then(res => {
					let cart_id = res.data.cart_id.join(',')
					return uni.navigateTo({
						url: '/pages/users/order_confirm/index?cartId=' + cart_id
					});
				}).catch(err => {
					that.$util.Tips({
						title: err
					})
				});
			},
			confirmOrder: function() {
				let that = this;
				uni.showModal({
					title: '确认收货',
					content: '为保障权益，请收到货确认无误后，再确认收货',
					success: function(res) {
						if (res.confirm) {
							orderTake(that.order_id).then(res => {
								return that.$util.Tips({
									title: '操作成功',
									icon: 'success'
								}, function() {
									that.getOrderInfo();
								});
							}).catch(err => {
								return that.$util.Tips({
									title: err
								});
							})
						}
					}
				})
			},
			/**
			 *
			 * 删除订单
			 */
			delOrder: function() {
				let that = this;
				orderDel(this.order_id).then(res => {
					return that.$util.Tips({
						title: '删除成功',
						icon: 'success'
					}, {
						tab: 3,
						url: 1
					});
				}).catch(err => {
					return that.$util.Tips({
						title: err
					});
				});
			},
			cancelOrder() {
				let self = this
				uni.showModal({
					title: '提示',
					content: '确认取消该订单?',
					success: function(res) {
						if (res.confirm) {
							orderDel(self.orderInfo.order_id)
								.then((data) => {
									console.log(data)
									self.$util.Tips({
										title: data.msg
									}, {
										tab: 3
									})
								})
								.catch((err) => {
									return self.$util.Tips({
										title: err
									});
								});
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			/*申请开票*/
			applyInvoice() {
				let that = this;
				that.invoice.invoice = true;
				that.$refs.addInvoicing.getInvoiceDefault();
				that.$refs.addInvoicing.getInvoiceList();
			},
			// 关闭发票弹窗
			changeInvoiceClose: function(data) {
				if(data)this.getInvoiceData(data);
				this.$set(this.invoice, 'invoice', false);
			},
			// 开票回调
			getInvoiceData(data) {
				let that = this
				applyInvoiceApi(that.order_id,data).then(res => {
					that.getOrderInfo();
					return that.$util.Tips({
						title: res.message,
					});
				}).catch(err => {
					return that.$util.Tips({
						title: err
					});
				})
			}
		}
	}
</script>
<style scoped lang="scss">
	.remark {
		flex: 1;
	}
	.merchant {
		width: 100%;
		height: 86rpx;
		padding: 0 30rpx;
		margin-top: 20rpx;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		box-sizing: border-box;
		border-radius: 24rpx 24rpx 0 0;
		.iconfont {
			font-size: 26rpx;
		}
	}
	.presell_bg_header{
		background-image: linear-gradient( 90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
		position: relative;
		&::after {
			content: "";
			position: absolute;
			left: 0;
			bottom: 0;
			width: 100%;
			height: 86rpx;        
			background: linear-gradient(0deg, #F5F5F5 0%, rgba(245, 245, 245, 0) 100%);	
		}
	}
	.b-color {
		background-color: var(--view-theme);
	}
	.t-color {
		color: var(--view-theme)!important;
	}
	.sys-head .bg{
		background-image: linear-gradient( 90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
	
	}
	.refund-head {
		.sys-title {
			color: #282828;
		}
		.bg {
			background: #fff;
			
		}
	}
	.headerCount{
		height: 260rpx;
		background-image: linear-gradient( 90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
		position: relative;
		&::after {
			content: "";
			position: absolute;
			left: 0;
			bottom: 0;
			width: 100%;
			height: 86rpx;        
			background: linear-gradient(0deg, #F5F5F5 0%, rgba(245, 245, 245, 0) 100%);	
		}
	}
	.header-gradient {
		position: relative;
	}
	.order-details .header {
		padding: 40rpx 30rpx;	
		&.presell_header{
			background-repeat: no-repeat;
			background-size: cover;
			padding: 30rpx;	
			.data{
				margin: 8rpx 0 0 13rpx;
				.state{
					font-weight: normal;
					font-size: 24rpx;
				}
			}
		}
	}
	.order-details .order-main {
		margin-top: -260rpx;
	}
	.take-info{
		padding: 0 30rpx 30rpx;
		margin-bottom: 14rpx;
	}
	.take-msg {
		display: flex;
		justify-content: space-between;
		background-color: #FAFAFA;
		padding: 24rpx;
		border-radius: 4rpx;
		.left {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			.title {
				font-size: 28rpx;
				font-weight: 500;
				color: #282828;
			}
			.text {
				color: #666666;
			}
		}
		.code {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			.iconfont {
				font-size: 50rpx;
				color: #666666;
			}
			.text {
				font-size: 20rpx;
				color: #666666;
				margin-top: 12rpx;
			}
		}
	}
	.order-details .header.on {
		background-color: #666 !important;
	}
	.order-details .header .pictrue {
		width: 110rpx;
		height: 110rpx;
	}
	.order-details .header .pictrue image {
		width: 100%;
		height: 100%;
	}
	.order-details .header .data {
		color: rgba(255, 255, 255, 0.8);
		font-size: 24rpx;
		margin-left: 27rpx;
	}
	.order-details .header .data.on {
		margin-left: 0;
	}
	.order-details .header .data .state {
		font-size: 30rpx;
		font-weight: bold;
		color: #fff;
	}
	.presell_header .presell_payment{
		color: #fff;
		font-size: 30rpx;
		font-weight: bold;
		.iconfont{
			font-weight: normal;
			margin-right: 8rpx;
		}
	}
	.order-details .header .data .time {
		margin-left: 20rpx;
	}
	.order-details .nav {
		background-color: #fff;
		width: 710rpx;
		height: 130rpx;
		border-radius: 24rpx;
		margin: 0 auto;
		font-size: 26rpx;
		color: #282828;
		padding: 25rpx 0;
	}
	.order-details .nav .navCon {
		padding: 0 40rpx;
	}
	.order-details .nav .navCon .nav-text{
		color: var(--view-theme);
	}
	.order-details .nav .on{
		font-weight: bold;
	}
	.order-details .nav .on ~ .nav-text{
		color: #282828;
	}
	.order-details .nav .progress {
		padding: 0 65rpx;
		margin-top: 36rpx;
	}
	.order-details .nav .progress .line {
		width: 100rpx;
		height: 2rpx;
		background-color: #999999;
		&.b-color{
			background: var(--view-theme);
		}
	}
	.order-details .nav .progress .iconfont {
		font-size: 20rpx;
		color: #939390;
		position: relative;
		left: 6rpx;
		&.t-color{
			color: var(--view-theme);
		}
	}
	.order-details .address {
		font-size: 26rpx;
		color: #999;
		margin-top: 20rpx;
		padding: 35rpx 30rpx;	
	}
	.order-details .address .name {
		font-size: 30rpx;
		color: #282828;
	}
	.order-details .address .phone {
		margin-left: 40rpx;
	}
	.order-details .address .address-info {
		margin-top: 20rpx;
	}
	.order-details .address .phonenumber{
		width: 34rpx;
		height: 34rpx;
		text-align: center;
		line-height: 26rpx;
		display: inline-block;
		background: var(--view-theme);
		border-radius: 100%;
		margin-left: 30rpx;
		position: relative;
		top: -6rpx;
	}
	.order-details .address .name .icon-a-icon_phonenumber{
		color: #fff;
		font-size: 16rpx;	
	}
	.order-details .line {
		width: 670rpx;
		height: 3upx;
		margin-left: 15rpx;
	}
	.order-details .line image {
		width: 100%;
		height: 100%;
		display: block;
	}
	.order-details .wrapper {
		background-color: #fff;
		margin-top: 20rpx;
		padding: 30rpx;
	}
	.order-details .wrapper .item {
		font-size: 28rpx;
		color: #282828;
		line-height: 46rpx;
	}
	.order-details .wrapper .virtual_item {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.order-details .virtual_item .virtual_row {
		width: 300rpx;
		align-items: center;
		justify-content: space-between;
		image,uni-image{
			width: 80rpx;
			height: 80rpx;
			border-radius: 100%;
		}
	}
	.order-details .virtual_item .virtual_detail {
		color: var(--view-theme);
	}
	.order-details .virtual_item .virtual_delivery {
		line-height: 40rpx;
	}
	.order-details .virtual_item .virtual_delivery_not {
		font-weight: bold;
	}
	.order-details .wrapper .item~.item {
		margin-top: 20rpx;
	}
	.order-details .wrapper .item .conter {
		color: #999999;
		max-width: 460rpx;
		display: flex;
		flex-wrap: nowrap;
		justify-content: flex-end;
		text-align: right;
	}
	.order-details .wrapper .item .virtual_image {
		margin-left: 50rpx;
	}
	.order-details .wrapper .item .virtual_image .picture{
		width: 106rpx;
		height: 106rpx;
		border-radius: 8rpx;
		margin-right: 10rpx;
		&:last-child{
			margin-right: 0;
		}
	}
	.order-details .wrapper .item .conter .copy {
		margin-left: 24rpx;
	}
	.order-details .wrapper .actualPay {
		border-top: 1px solid #eee;
		margin-top: 30rpx;
		padding-top: 30rpx;
	}
	.order-details .wrapper .actualPay .money {
		font-weight: bold;
		font-size: 30rpx;
	}
	.order-details .footer {
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
		background-color: #fff;
		padding: 0 30rpx;
		height: 100rpx;
		height: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		box-sizing: border-box;
	}
	.content-clip{
		height: 120rpx;
		height: calc(120rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
	}
	.order-details .footer .bnt {
		width: 156rpx;
		text-align: center;
		height: 60rpx;
		border-radius: 50rpx;
		color: #fff;
		font-size: 27rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		&.btn_auto{
			width: auto;
			padding: 0 40rpx;
		}
		~.bnt {
			margin-left: 17rpx;
		}
	}
	.order-details .footer .bnt.cancel {
		color: #666666;
		border: 1px solid #ddd;
	}
	.order-details .footer .bnt~.bnt {
		margin-left: 18rpx;
	}
	.order-details .writeOff {
		background-color: #fff;
		margin-top: 13rpx;
		padding-bottom: 30rpx;
	}
	.order-details .writeOff .title {
		font-size: 30rpx;
		color: #282828;
		height: 87rpx;
		border-bottom: 1px solid #f0f0f0;
		padding: 0 30rpx;
		line-height: 87rpx;
	}
	.grayBg .pictrue {
		width: 290rpx;
		height: 290rpx;
		margin: 0 auto;
	}
	.grayBg .pictrue image {
		width: 100%;
		height: 100%;
		display: block;
	}
	.gear {
		width: 590rpx;
		height: 30rpx;
		margin: 0 auto;
	}
	.gear image {
		width: 100%;
		height: 100%;
		display: block;
	}
	.num {
		color: #282828;
		font-size: 34rpx;
		font-weight: bold;
		margin: 0 auto;
		text-align: center;
		margin-top: 30rpx;
	}
	.order-details .writeOff .rules {
		margin: 46rpx 30rpx 0 30rpx;
		border-top: 1px solid #f0f0f0;
		padding-top: 10rpx;
	}
	.order-details .writeOff .rules .item {
		margin-top: 20rpx;
	}
	.order-details .writeOff .rules .item .rulesTitle {
		font-size: 28rpx;
		color: #282828;
	}
	.order-details .writeOff .rules .item .rulesTitle .iconfont {
		font-size: 30rpx;
		color: #333;
		margin-right: 8rpx;
		margin-top: 5rpx;
	}
	.order-details .writeOff .rules .item .info {
		font-size: 28rpx;
		color: #999;
		margin-top: 7rpx;
	}
	.order-details .writeOff .rules .item .info .time {
		margin-left: 20rpx;
	}
	.order-details .map {
		height: 86rpx;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		margin-top: 13rpx;
		padding: 0 30rpx;
		position: relative;
		&::after{
			content: "";
			width: 664rpx;
			height: 2rpx;
			background: #f0f0f0;
			position: absolute;
			left: 24rpx;
			bottom: 0;
		}
	}
	.order-details .map .place {
		font-size: 26rpx;
		width: 164rpx;
		border-radius: 26rpx;
		line-height: 46rpx;
		text-align: center;
		border: 1px solid var(--view-theme);
	}
	.order-details .map .place .iconfont {
		font-size: 27rpx;
		height: 27rpx;
		line-height: 27rpx;
		margin: 2rpx 3rpx 0 0;
	}
	.refund {
		padding: 0 30rpx 30rpx;
		margin-top: 24rpx;
		background-color: #fff;
		.title {
			display: flex;
			align-items: center;
			font-size: 30rpx;
			color: #333;
			height: 86rpx;
			border-bottom: 1px solid #f5f5f5;
			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 10rpx;
			}
		}
		.con {
			padding-top: 25rpx;
			font-size: 28rpx;
			color: #999;
		}
	}
	.qs-btn {
		width: auto;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 50rpx;
		color: #fff;
		font-size: 27rpx;
		padding: 0 3%;
		color: #aaa;
		border: 1px solid #ddd;
		margin-right: 20rpx;
	}
	.code-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 32rpx 0 60rpx 0;
		background: #ffffff;
		border-radius: 40rpx 40rpx 0 0;
		position: relative;
		.iconfont{
			font-size: 24rpx;
			color: #939393;
			position: absolute;
			top: 20rpx;
			right: 20rpx;
		}
		.title{
			color: #282828;
			font-size: 32rpx;
		}
		.trip {
			font-size: 28rpx;
			font-weight: 400;
			color: #666666;
			margin: 40rpx 0;
		}
	}
	.plan_type_class {
		color: rgb(0, 122, 255);
		margin-top: 2px;
		padding: 0px 4px;
		height: 20px;
		border: 1px solid rgb(66, 151, 255);
		border-radius: 3px;
		line-height: 20px;
		font-size: 10px;
		font-weight: 400;
		width: fit-content;
		margin-bottom: 10px;
	}
	.go-item {
		border-radius: 5px;
		background-color: #1f73d9;
		color: #FFFFFF;   
		 width: 20px; 
		 height: 20px;
		 text-align: center;
		 margin-right: 5px;
		 font-size: 12px;
		 line-height: 20px;
	}
	.back-item {
		border-radius: 5px;
		background-color: #ff5303;
		color: #FFFFFF;   
		 width: 20px; 
		 height: 20px;
		 text-align: center;
		 margin-right: 5px;
		 font-size: 12px;
		 line-height: 20px;
	}
	.bus-detail-header .rule-line {
	    max-height: 64px;
	    font-size: 12px;
	    display: flex;
	    justify-content: space-between;
	    align-items: flex-start;
	    padding: 4px 0;
	    // border-top: 1px dashed #f4f4f4
	}
	
	
	.bus-detail-header .rule-line .rule-list {
	    color: #666;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    display: flex;
	    flex: 1;
	    flex-wrap: wrap;
	    max-height: 34px
	}
	
	.bus-detail-header .rule-line .rule-list .rule-item:after {
	    margin: 0 4px;
	    height: 12px;
	    content: "";
	    border-right: 1px solid #999;
	    display: inline-block;
	    vertical-align: 0
	}
	
	.bus-detail-header .rule-line .rule-list .rule-item:last-child:after {
	    display: none
	}
	
	.bus-detail-header .rule-line .product-desc {
	    color: #5678a8;
	    min-width: 24px
	}
	.bus-detail-header .header-row {
	    display: flex;
	    flex-direction: row;
	    align-items: center
	}
	
	.bus-detail-header .info-line {
	    line-height: 30px;
	    padding-right: 15px
	}
	.bus-detail-header .info-line .info-tag {
	    top: 0;
	    height: 22px;
	    line-height: 22px;
	    background-color: #99afca;
	    color: #fff;
	    padding-left: 15px;
	    padding-right: 10px;
	    position: relative;
	    margin-right: 15px;
	}
	.bus-detail-header .info-line .info-tag:after {
	    content: "";
	    position: absolute;
	    left: 100%;
	    top: 0;
	    height: 0;
	    width: 0;
	    border-radius: 0 3px 0 0;
	    border-color: #99afca transparent transparent #99afca;
	    border-style: solid;
	    border-width: 11px 4px
	}
	.bus-detail-header .header-section {
	    padding: 5px 15px 0 8px;
	}
	.bus-detail-header .station-row {
	    font-weight: 500;
	    position: relative;
	}
	.bus-detail-header .dot {
	    height: 6px;
	    width: 6px;
	    border-radius: 50%;
	    background-color: #00b87a;
	    margin: 11px
	}
	.bus-detail-header .station-row .dot:after {
	    position: absolute;
	    content: "";
	    width: 4px;
	    background-color: #f4f4f4;
	    left: 12px;
	    top: calc(50% + 6px);
	    bottom: 0;
	    z-index: 0;
	    overflow: visible;
	}
	.bus-detail-header .station-row .dot.arr:after {
	    top: 0;
	    bottom: calc(50% + 6px);
	}
	.bus-detail-header .dot.arr {
	    background-color: #f5190a
	}
	.bus-detail-header .station-row .time {
	    font-size: 15px;
	    font-weight: 600;
	    text-align: left;
	    width: 54px;
	    flex-shrink: 0
	}
	.bus-detail-header .station-row .station-text {
	    font-size: 12px;
	    color: #999;
	}
	.bus-detail-header .header-section .show-station-btn {
	    color: #5678a8;
	    display: flex;
	    flex-direction: column;
	    align-items: center;
	    justify-content: center;
	    font-size: 12px;
	    user-select: none;
	}
	.in-desc-header-container {
	    background: #fff;
	    border-radius: 6px;
	    border: 1px solid #ddd;
	    margin: 16px 0;
	    overflow: hidden;
	}
	.locpop .dot {
	    height: 6px;
	    width: 6px;
	    border-radius: 50%;
	    margin: 11px
	}
	.tag-title {
	    color: #333;
	    font-size: 17px;
	    padding: 8px 0 0 3px;
	    font-weight: 800;
	    line-height: 20px;
	}
	
	.tickets-way-box {
		background: #fff;
		margin: 0 4px;
		margin-top: 8px;
		border-radius: 4px;
	}
	
	.tickets-qrcode {
		border-radius: 8px;
		overflow: hidden;
	}
	
	.tickets-no-qrcode {
		border-radius: 8px;
		overflow: hidden;
	}
	
	.tickets-way-box .title-box {
		background-color: #e7fff2;
		padding: 6px 9px;
		justify-content: center;
	}
	
	.tickets-way-box .title-box .title {
		font-size: 12px;
		color: #999;
	}
	
	.tickets-way-box .qrcdoe-box {
		background-color: #f5fff9;
		text-align: center;
		border-radius: 20rpx 20rpx 0 0;
		padding-top: 30rpx;
		position: relative;
	}
	
	.pictrue {
		width: 200rpx;
		height: 200rpx;
	}
	
	.pictrue image {
		width: 100%;
		height: 100%;
		display: block;
	}
	
	.ticket-info {
		text-align: center;
		color: #282828;
		font-size: 20px;
		padding: 15px 0;
		margin-right: 18px;
	}
	
	.maxglass {
		display: inline-block;
		background: url() no-repeat center;
		background-size: 100% 100%;
		width: 18px;
		height: 20px;
		margin-left: 5px;
	}
	
	.qrcode-item {
		display: flex;
		margin: 0 auto;
		align-items: baseline;
		justify-content: center;
	}
	
	.qrcode-container {
		background-color: #FFF;
		border-radius: 8rpx;
		margin: 20px 30px;
		text-align: center;
	}
	
	.qr-tip,
	.qrcode-img {
		width: 400rpx;
		height: 400rpx;
	}
	
	.qr-tip {
		display: flex;
		-webkit-box-pack: center;
		justify-content: center;
		-webkit-box-align: center;
		align-items: center;
		font-size: 28rpx;
	}
	.station-text {
	    font-size: 12px;
	    color: #999;
	}
</style>

